# 数字验证  isdigit,只能验证十进制阿拉伯数字，其它不可
str = '12313'
print(str.isdigit())
str2 = '一二三'
print(str2.isdigit())
str3 = '123130xFF'
print(str3.isdigit())
str4 = 'ⅠⅡⅢⅣⅤⅥⅦⅧⅨ' #罗马数字
print(str4.isdigit())
str5 = '壹贰叁'
print(str5.isdigit())
str9 = '0b0101'
print(str9.isdigit())
print('----'*40)


# 数字验证。isnumeric
str6 = '123123123'
print(str6.isnumeric())
str7 = '1231一二三'
print(str7.isnumeric())
print('一二三'.isnumeric())
print('0b0101'.isnumeric()) #二进制不认识
print('壹贰叁'.isnumeric()) #人民币数字
print('ⅠⅡⅢⅣⅤⅥⅦⅧⅨ'.isnumeric()) #罗马
print('---'*49)

# 验证是否都为字母包括中文件字符
print('abc你好'.isalpha())
print('你好'.isalpha())
print('abcd'.isalpha())
print('32321abc'.isalpha())
print('你好一二三'.isalpha())
print('壹贰叁'.isalpha())
print('ⅠⅡⅢⅣⅤⅥⅦⅧⅨ'.isalpha()) #罗马不认识
print('--'*40)

#  验证。数字与字母 包括中文字符
print('wqvb1231'.isalnum())
print('wqvb'.isalnum())
print('12312'.isalnum())
print('你好12312'.isalnum())
print('你好二三四'.isalnum())
print('你好ⅠⅡⅢⅣⅤⅥⅦⅧⅨ'.isalnum())
print('你好壹贰叁'.isalnum())
print('你好壹贰叁323'.isalnum())
print('--'*40)

# 验证全是小写字母
print('helloworld'.islower())
print('Helloworld'.islower())
print('helloWorld'.islower())
print('helloworld12'.islower())
print('helloworld一二'.islower())
print('helloworld你好'.islower())
print('--'*40)

# 验证首字母是大写
print('HELLOWORLD'.isupper())
print('Helloworld'.isupper())
print('helloWorld'.isupper())
print('SDDD12'.isupper())
print('HELLO一二'.isupper())
print('HELLO你好'.isupper())
print('--'*40)

#字符串首字母是大写
print('Helloworld'.istitle())
print('HelloWorld'.istitle())
print('Helloworld'.istitle())
print('Helloorld你发'.istitle())
print('Helloorld12'.istitle())
print('--'*40)

# 判断是否都是空白字符

print(' '.isspace())
print(''.isspace())
print('\n'.isspace())
print('\t'.isspace())

